import request from '@/utils/request'

// 获取模型列表
export const getModels = () => {
  return request({
    url: `/model`,
    method: 'get'
  })
}

// 获取模型
export const getModel = (id) => {
  return request({
    url: `/model/${id}`,
    method: 'get'
  })
}

// 创建模型
export const createModel = (data) => {
  return request({
    url: `/model`,
    method: 'post',
    data
  })
}

// 修改模型
export const updateModel = (id, data) => {
  return request({
    url: `/model/${id}`,
    method: 'put',
    data
  })
}

// 删除模型
export const removeModel = (id) => {
  return request({
    url: `/model/${id}`,
    method: 'delete',
  })
}

